<template>
  <svg :height="height" :width="width">
    <use :xlink:href="prefix + name" :fill="color"></use>
  </svg>
</template>

<script setup lang="ts" name="index">
//接受父组件传递过来的参数
defineProps({
  //xlink：href属性值的前缀
  prefix: {
    type: String,
    //默认值
    default: '#icon-'
  },
  name: String,
  //接受父组件传递过来的颜色
  color: {
    type: String,
    default: ''
  },
  //接受父组件传递过来的大小
  height: {
    type: String,
    default: '100px'
  },
  width: {
    type: String,
    default: '100px'
  }
})
</script>


<style scoped></style>
